﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Caffeine.Core.Test.TestModel
{
    public class ModelForPropertyValidationTesting : ModelBase
    {
        #region StringValue Property

        [ModelBackingProperty(typeof(String), "StringValueProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<String> _StringValueProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the StringValue backing property
        /// </summary>
        public ModelProperty<String> StringValueProperty
        {
            get { return _StringValueProperty; }
        }

        /// <summary>
        /// Gets or sets the StringValueProperty.Value value. This property supports change notification. If the StringValueProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [StringValueProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public String StringValue
        {
            get { return StringValueProperty.Value; }
            set { StringValueProperty.Value = value; }
        }

        /// <summary>
        /// Gets the StringValueProperty.CommittedValue value. This property supports change notification. If the StringValueProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [StringValue + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public String StringValueCommittedValue
        {
            get { return StringValueProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the StringValueProperty.IsDirty flag. This property supports change notification. If the StringValueProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [StringValue + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool StringValueIsDirty
        {
            get { return StringValueProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the StringValueProperty.IsInvalid flag. This property supports change notification. If the StringValueProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [StringValue + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool StringValueIsInvalid
        {
            get { return StringValueProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the StringValueProperty.IsDefault flag. This property supports change notification. If the StringValueProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [StringValue + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool StringValueIsDefault
        {
            get { return StringValueProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the StringValueProperty.ValidationErrors enumeration. This property supports change notification. If the StringValueProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [StringValue + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> StringValueValidationErrors
        {
            get { return StringValueProperty.ValidationErrors; }
        }

        #endregion

        #region CharValue Property

        [ModelBackingProperty(typeof(Char), "CharValueProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Char> _CharValueProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the CharValue backing property
        /// </summary>
        public ModelProperty<Char> CharValueProperty
        {
            get { return _CharValueProperty; }
        }

        /// <summary>
        /// Gets or sets the CharValueProperty.Value value. This property supports change notification. If the CharValueProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [CharValueProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Char CharValue
        {
            get { return CharValueProperty.Value; }
            set { CharValueProperty.Value = value; }
        }

        /// <summary>
        /// Gets the CharValueProperty.CommittedValue value. This property supports change notification. If the CharValueProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [CharValue + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Char CharValueCommittedValue
        {
            get { return CharValueProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the CharValueProperty.IsDirty flag. This property supports change notification. If the CharValueProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [CharValue + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool CharValueIsDirty
        {
            get { return CharValueProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the CharValueProperty.IsInvalid flag. This property supports change notification. If the CharValueProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [CharValue + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool CharValueIsInvalid
        {
            get { return CharValueProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the CharValueProperty.IsDefault flag. This property supports change notification. If the CharValueProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [CharValue + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool CharValueIsDefault
        {
            get { return CharValueProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the CharValueProperty.ValidationErrors enumeration. This property supports change notification. If the CharValueProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [CharValue + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> CharValueValidationErrors
        {
            get { return CharValueProperty.ValidationErrors; }
        }

        #endregion

        #region NullableCharValue Property

        [ModelBackingProperty(typeof(Nullable<Char>), "NullableCharValueProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Nullable<Char>> _NullableCharValueProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the NullableCharValue backing property
        /// </summary>
        public ModelProperty<Nullable<Char>> NullableCharValueProperty
        {
            get { return _NullableCharValueProperty; }
        }

        /// <summary>
        /// Gets or sets the NullableCharValueProperty.Value value. This property supports change notification. If the NullableCharValueProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharValueProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Nullable<Char> NullableCharValue
        {
            get { return NullableCharValueProperty.Value; }
            set { NullableCharValueProperty.Value = value; }
        }

        /// <summary>
        /// Gets the NullableCharValueProperty.CommittedValue value. This property supports change notification. If the NullableCharValueProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharValue + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Nullable<Char> NullableCharValueCommittedValue
        {
            get { return NullableCharValueProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the NullableCharValueProperty.IsDirty flag. This property supports change notification. If the NullableCharValueProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharValue + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool NullableCharValueIsDirty
        {
            get { return NullableCharValueProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the NullableCharValueProperty.IsInvalid flag. This property supports change notification. If the NullableCharValueProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharValue + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool NullableCharValueIsInvalid
        {
            get { return NullableCharValueProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the NullableCharValueProperty.IsDefault flag. This property supports change notification. If the NullableCharValueProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharValue + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool NullableCharValueIsDefault
        {
            get { return NullableCharValueProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the NullableCharValueProperty.ValidationErrors enumeration. This property supports change notification. If the NullableCharValueProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharValue + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> NullableCharValueValidationErrors
        {
            get { return NullableCharValueProperty.ValidationErrors; }
        }

        #endregion

        #region Int32Value Property

        [ModelBackingProperty(typeof(Int32), "Int32ValueProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Int32> _Int32ValueProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the Int32Value backing property
        /// </summary>
        public ModelProperty<Int32> Int32ValueProperty
        {
            get { return _Int32ValueProperty; }
        }

        /// <summary>
        /// Gets or sets the Int32ValueProperty.Value value. This property supports change notification. If the Int32ValueProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32ValueProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Int32 Int32Value
        {
            get { return Int32ValueProperty.Value; }
            set { Int32ValueProperty.Value = value; }
        }

        /// <summary>
        /// Gets the Int32ValueProperty.CommittedValue value. This property supports change notification. If the Int32ValueProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Value + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Int32 Int32ValueCommittedValue
        {
            get { return Int32ValueProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the Int32ValueProperty.IsDirty flag. This property supports change notification. If the Int32ValueProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Value + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool Int32ValueIsDirty
        {
            get { return Int32ValueProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the Int32ValueProperty.IsInvalid flag. This property supports change notification. If the Int32ValueProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Value + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool Int32ValueIsInvalid
        {
            get { return Int32ValueProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the Int32ValueProperty.IsDefault flag. This property supports change notification. If the Int32ValueProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Value + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool Int32ValueIsDefault
        {
            get { return Int32ValueProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the Int32ValueProperty.ValidationErrors enumeration. This property supports change notification. If the Int32ValueProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Value + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> Int32ValueValidationErrors
        {
            get { return Int32ValueProperty.ValidationErrors; }
        }

        #endregion

        #region NullableInt32Value Property

        [ModelBackingProperty(typeof(Nullable<Int32>), "NullableInt32ValueProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Nullable<Int32>> _NullableInt32ValueProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the NullableInt32Value backing property
        /// </summary>
        public ModelProperty<Nullable<Int32>> NullableInt32ValueProperty
        {
            get { return _NullableInt32ValueProperty; }
        }

        /// <summary>
        /// Gets or sets the NullableInt32ValueProperty.Value value. This property supports change notification. If the NullableInt32ValueProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableInt32ValueProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Nullable<Int32> NullableInt32Value
        {
            get { return NullableInt32ValueProperty.Value; }
            set { NullableInt32ValueProperty.Value = value; }
        }

        /// <summary>
        /// Gets the NullableInt32ValueProperty.CommittedValue value. This property supports change notification. If the NullableInt32ValueProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableInt32Value + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Nullable<Int32> NullableInt32ValueCommittedValue
        {
            get { return NullableInt32ValueProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the NullableInt32ValueProperty.IsDirty flag. This property supports change notification. If the NullableInt32ValueProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableInt32Value + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool NullableInt32ValueIsDirty
        {
            get { return NullableInt32ValueProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the NullableInt32ValueProperty.IsInvalid flag. This property supports change notification. If the NullableInt32ValueProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableInt32Value + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool NullableInt32ValueIsInvalid
        {
            get { return NullableInt32ValueProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the NullableInt32ValueProperty.IsDefault flag. This property supports change notification. If the NullableInt32ValueProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableInt32Value + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool NullableInt32ValueIsDefault
        {
            get { return NullableInt32ValueProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the NullableInt32ValueProperty.ValidationErrors enumeration. This property supports change notification. If the NullableInt32ValueProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableInt32Value + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> NullableInt32ValueValidationErrors
        {
            get { return NullableInt32ValueProperty.ValidationErrors; }
        }

        #endregion
    }
}
